using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WHXK;

namespace Web
{
    public partial class hxt_thy : System.Web.UI.Page
    {
        public string picpath = "Upload/";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if(Request.Params["cid"] != null)
                showpic(Request.Params["cid"].ToString(), "HXT", DataList1);
            }
        }
        private void showpic(string complex_id, string ditct_code, DataList dlt)
        {

            string dict_id = "";
            WHXK.DictInfo di1 = new DictInfo();
            DataSet ds3 = new DataSet();
            if (di1.getAllDictInfo(ref ds3, " dict_code = '" + ditct_code + "'"))
            {
                if (ds3.Tables[0].Rows.Count > 0)
                    dict_id = ds3.Tables[0].Rows[0]["dict_id"].ToString();
            }

            WHXK.ComplexPicInfo cpi = new ComplexPicInfo();
            DataSet ds2 = new DataSet();
            if (cpi.getAllComplexPicInfo(ref ds2, " complex_id ='" + complex_id + "' and complexpic_type='" + dict_id + "'"))
            {
                dlt.DataSource = ds2;
                dlt.DataBind();
            }
        }
    }
}
